"use strict";
// class 类名在TS的一个项目环境下只能出现一次
var UserD = /** @class */ (function () {
    function UserD() {
        this.name = "";
        this.age = 0;
        this.sex = "";
    }
    UserD.prototype.say = function () {
        // 当前方法中的 this 当前 class 构成的实例对象
        console.log(this.name, this.age, this.sex);
    };
    return UserD;
}());
var user1 = new UserD();
user1.name = "tom";
user1.age = 33;
user1.sex = "M";
user1.say();
console.log(user1);
var user2 = new UserD();
user2.name = "json";
user2.age = 23;
user2.sex = "aa";
console.log(user2);
// TS中class的构造函数重写
var UserE = /** @class */ (function () {
    // 描述当前class的够赞函数的方法体和形参
    function UserE(name, age, sex) {
        // 重写userE的构造函数
        // 构造函数中的this 
        this.name = name;
        this.age = age;
        this.sex = sex;
    }
    UserE.prototype.say = function () {
        // 当前方法中的 this 当前 class 构成的实例对象
        console.log(this.name, this.age, this.sex);
    };
    return UserE;
}());
var user3 = new UserE("aaa", 11, "f");
user3.say();
console.log("user3", user3);
